//机器狗 主控ESP8266,pca9685驱动舵机,位置传感器ADXL345,超声发射D8,超声接受D7。D1SCL,D2SDA
//带EEPRAM调中。
// 腿1  腿2
// 腿3  腿4
//pca9685--0,1,2,3,4,5,6,7


#define BLINKER_WIFI
#include <Blinker.h>
BlinkerButton Button1("1");
BlinkerButton Button3("3");
BlinkerButton Button4("4");
BlinkerButton Button2("2");
BlinkerButton Button5("5");
BlinkerButton Button6("6");
BlinkerButton Button7("7");
BlinkerButton Button8("8");
BlinkerButton Button9("9");
BlinkerButton Button0("0");
BlinkerSlider huakua0("huakuai0");
BlinkerSlider huakua1("huakuai1");



boolean rec = false;
String comdata = "";
int tt[8];                      //调中
int tt2[8];

int remote_x;
int remote_y;
char auth[] = "d1daa5ff10be";
char ssid[] = "abc";
char pswd[] = "12344321";
int kk = 4; //



void huakua0_callback(int32_t value)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  remote_x = value;
}

void huakua1_callback(int32_t value)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  remote_y = value;
}





void button1_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("1");
  kk = 1;
}

void button0_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("0");
  kk = 0;
  BLINKER_LOG("get button state: ", state);


}


void button2_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("2");
  kk = 2;
}

void button3_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("3");
  kk = 3;
}

void button4_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("4");
  kk = 4;
}

void button5_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("5");
  kk = 5;
}

void button6_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("6");
  kk = 6;
}

void button7_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("7");
  kk = 7;
}

void button8_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("8");
  kk = 8;
}

void button9_callback(const String & state)
{
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  Serial.println("9");
  kk = 9;
}


#include <EEPROM.h>
#include <Wire.h>
#include <ADXL345.h>
ADXL345 accel(ADXL345_STD);
#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

#include "ESP8266TimerInterrupt.h"
volatile bool statusLed = false;
volatile uint32_t lastMillis = 0;
#define TIMER_INTERVAL_MS       1000
#define SERVOMIN  150 // This is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX  800 // This is the 'maximum' pulse length count (out of 4096)
#define SERVO_FREQ 50 // Analog servos run at ~50 Hz updates
uint8_t servonum = 0;

// Init ESP8266 timer 0
ESP8266Timer ITimer;


float weizhi[8] ; //
float weizhi1[8] ; //
float weizhi2[8] ; //

float L2I[8]  ; //
float DL0[8]  ; //
float L02I[8]  ; //
float SITA [8]; //
float AERFA[8]  ; //
float BAITA [8] ; //


int fangxiang[9] ; //

int  LEG_kongzhizhuangliuliu[8][16];

int i = 0; //
int j = 0; //
int k2 = 6; //
int k = 0; //


float x;
float y;
float x2 = -0.2 ; //
float y2 = 8; //减小后半部降低
float dx1 = 0; //
float dx2 = 0; //
float dx3 = 0; //
float dy1 = 0; //
float dy2 = 0; //
float dy3 = 0; //
float ddx1 = 0; //
float ddx2 = 0; //
float ddy1 = 0; //
float ddy2 = 0; //

long zuoyou = 0; //
long zuoyou1 = 0; //
long zuoyou2 = 0; //
long qianhou = 0; //
long qianhou1 = 0; //
long qianhou2 = 0; //
long o1 = 0; //
long o2 = 0; //


int LEG[12] = {0}; //

int rrr = 1000; //超声距离
int r;//超声端口状态
int r_suiji;//超声端口状态

int zhanli();//
int zou();//
int kuaizou();//
int houtui();//
int shensuo();//
int qianshen();//
int houshen();//
int zuozhuan();//
int youzhuan();//
int wodao( );
int woshou( );



void setup()
{


  EEPROM.begin(512);
  for (int i = 0; i < 8; i++)
  {

    tt2[i] = EEPROM.read(2 * i);

    if ( tt2[i] > 0)tt[i] = -1 * EEPROM.read(2 * i + 1);
    else
      tt[i] = EEPROM.read(2 * i + 1);
  }
  EEPROM.end();




  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output

  pinMode(D8, OUTPUT);    //超声
  pinMode(D7, INPUT);    //超声


  Wire.begin();
  pwm.begin();
  pwm.setOscillatorFrequency(25000000);
  pwm.setPWMFreq(SERVO_FREQ);  // Analog servos run at ~50 Hz updates
  delay(1000);

  if (!accel.writeRate(ADXL345_RATE_200HZ)) {
    Serial.println("write rate: failed");

  }
  if (!accel.writeRange(ADXL345_RANGE_16G)) {
    Serial.println("write range: failed");

  }

  if (!accel.start()) {
    Serial.println("start: failed");
  }


  Blinker.begin(auth, ssid, pswd);

  Button1.attach(button1_callback);
  Button0.attach(button0_callback);
  Button2.attach(button2_callback);
  Button3.attach(button3_callback);
  Button4.attach(button4_callback);
  Button5.attach(button5_callback);
  Button6.attach(button6_callback);
  Button7.attach(button7_callback);
  Button8.attach(button8_callback);
  Button9.attach(button9_callback);

  huakua0.attach(huakua0_callback);
  huakua1.attach(huakua1_callback);





  for (int n = 0; n <= 7; n++)
  {
    fangxiang[n] = 280;
  }


}


void loop() {
  Blinker.run();

  //"a"=97

  comdata = "";
  while (Serial.available() > 0)
  {
    rec = true;
    comdata += char(Serial.read());
    delay(2);
  }

  if (rec)
  {
    rec = false;
    if (int(comdata[1]) - 45 == 0)
    {
      tt[int(comdata[0]) - 97] =  ((comdata[2] - 48) * 100 + (comdata[3] - 48) * 10 + comdata[4] - 48);
      tt[int(comdata[0]) - 97] = tt[int(comdata[0]) - 97] * -1;
    }
    else
      tt[int(comdata[0]) - 97] = (comdata[1] - 48) * 100 + (comdata[2] - 48) * 10 + comdata[3] - 48;

    if (tt[int(comdata[0]) - 97] > 255)tt[int(comdata[0]) - 97] = 255;
    if (tt[int(comdata[0]) - 97] < -255)tt[int(comdata[0]) - 97] = -255;

    if (int(comdata[0]) - 97 >= 0 && int(comdata[0]) - 97 < 8)
    {

      EEPROM.begin(512);
      for (int i = 0; i < 8; i++)
      {
        if (tt[i] < 0)
        { tt2[i] = 10;
          tt[i] = -1 * tt[i];
          EEPROM.write(i * 2, tt2[i]);
          EEPROM.write(i * 2 + 1, tt[i]);
        }
        else
          EEPROM.write(i * 2, 0);
        EEPROM.write(i * 2 + 1, tt[i]);
      }
      for (int i = 0; i < 8; i++)
      {

        tt2[i] = EEPROM.read(2 * i);

        if ( tt2[i] > 0)tt[i] = -1 * EEPROM.read(2 * i + 1);
        else
          tt[i] = EEPROM.read(2 * i + 1);
      }

      EEPROM.end();
    }

  }
  // for (int i = 0; i < 8; i++)
  {
    //   Serial.print("tt");
    //   Serial.print(tt[i]);
  }
  // Serial.println("");


  k++;

  if (k >= k2)
  {
/*

    */
    k = 0;
    j++;
    if (j >= 16)
    {
        j = 0;
    //超声探测
    for ( int i = 0; i <= 10; i++)
    {
      digitalWrite(D8, HIGH);
    }
    digitalWrite(D8, LOW);
    r = digitalRead(D7);
    while (r == 0)
    {
      r = digitalRead(D7);
      rrr = 0; //478-180-70------------------------------------------------超声控制距离
    }
    while (r == 1)
    {
      r = digitalRead(D7);
      rrr = rrr + 1;
    }
    //超声探测
    }
  


  }





  //Serial.print("leg_b");
  //Serial.println(leg_b);
  if (accel.update()) {
    x = accel.getX() * 120;
    y = accel.getY() * 80;
  }
  /*
    Serial.print("X");
    Serial.print(x);
    Serial.print("Y");
    Serial.println(y);
  */
  if (j > 8)digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));

  if (kk == 7)shensuo( ); //
  if (kk == 8)qianshen( );// �
  if ( kk ==  10)houshen( );//
  if ( kk ==  0)zou( );
  if ( kk ==  5)kuaizou( );
  if ( kk ==  4)zhanli( );
  if ( kk ==  2)zuozhuan( );
  if ( kk == 3)youzhuan( );
  if ( kk ==  1)houtui( );
  if ( kk ==  6)wodao( );
  if ( kk ==  9) woshou( );


  //超声探测
  if (rrr < 800)
  {
    if (kk == 0)
    {
 kk = 1; //后退

    }



  }
  //超声探测
  /*
Serial.print("rrr ");
Serial.print(rrr );
Serial.print("kk");
Serial.println(kk);////////////////////////////////////////////////////////////////


  for (int n = 0; n <= 7; n++)
  {
    weizhi[n] =(weizhi[n]*4+ LEG_kongzhizhuangliuliu[n][j])/5 ;

  }
*/
  for (int n = 0; n <= 7; n++)
  {
    if (j < 15) weizhi[n] = LEG_kongzhizhuangliuliu[n][j] + (LEG_kongzhizhuangliuliu[n][j + 1] - LEG_kongzhizhuangliuliu[n][j]) * k / k2  ;
    else
      weizhi[n] = LEG_kongzhizhuangliuliu[n][15] + (LEG_kongzhizhuangliuliu[n][0] - LEG_kongzhizhuangliuliu[n][15]) * k / k2 ;
  }


  //x1 = (50 * x1 + analogRead(3)) / 51;
  //y1 = (50 * y1 + analogRead(2)) / 51; //340

  dx2 = dx1 ;
  dy2 = dy1 ;
    dx3 = dx1;
    dy3 = dy1;
    zuoyou1 = (zuoyou1*20 + dx3) / 21;
    qianhou1 = (qianhou1*20  + dy3) / 21 ;

    
  ddx2 = (ddx2 * 20 + ddx1) / 21;
  ddy2 = (ddy2 * 20 + ddy1) / 21;


  dx1 = (x - x2) * 7; //
  dy1 = -(y - y2  ) * 8;
  //  if(dx1 <17)dx1 = 0;
  //  if(dy1 <17)dy1 = 0;
  ddx1 = (dx1 - dx2) * 10; //
  ddy1 = (dy1 - dy2) * 10; //
  //zuoyou1 = (zuoyou1 * 80 + dx1) /81;

  zuoyou2 = (zuoyou2 * 20 + ddx2) / 21;
  qianhou2 = ( qianhou2 * 20 + ddy2) / 21;
  // zuoyou =  zuoyou2;
  /*
    Serial.print( "zuoyou2 ");
    Serial.println(zuoyou2 );
     Serial.print( "qianhou2");
    Serial.println(qianhou2 );
  */
  zuoyou = -zuoyou1 + zuoyou2 + remote_x * 2;
  qianhou = qianhou1 - qianhou2 + remote_y * 2 ;


//zuoyou = 0;
//qianhou = 0;
  // zuoyou_t1=(x2 - x1) * 10;
  //zuoyou_t3;
  //  zuoyou = -zuoyou1 + zuoyou2;//qianhou,zuoyou 25


  if (zuoyou > 300) zuoyou = 300;
  if (zuoyou < -300) zuoyou = -300;
  if (qianhou > 300) qianhou = 300;
  if (qianhou < -300) qianhou = -300;

  /*
      Serial.print(x1);
      Serial.print("x");
      Serial.println( x2);
  */




  o1=0;
  o1=o1+(weizhi[0]-weizhi[2]+weizhi[4]-weizhi[6])*0.8;
  o2=(o2*5+o1)/6;

  weizhi1[1] = weizhi[1] * 1.6 ;
  weizhi1[3] = weizhi[3] * 1.5 ;
  weizhi1[5] = weizhi[5] * 1.6;
  weizhi1[7] = weizhi[7] * 1.5 ;

  /*
    if (weizhi[0] <= 100) weizhi1[0]   = weizhi[0]* 1.2    + zuoyou - qianhou ; //+zuoyou+qianhou
    if (weizhi[2] <= 100) weizhi1[2]  = weizhi[2]* 1.2    - zuoyou - qianhou ; //-zuoyou+qianhou
    if (weizhi[4] <= 100) weizhi1[4]  = weizhi[4] * 1.2   + zuoyou + qianhou; //+zuoyou
    if (weizhi[6] <= 100) weizhi1[6]   = weizhi[6]* 1.2     - zuoyou + qianhou; //-zuoyou
  */


  weizhi1[0]  = weizhi[0] * 1.3  + zuoyou - qianhou-o2 ; //+zuoyou+qianhou
  weizhi1[2] = weizhi[2] * 1.3   - zuoyou - qianhou+o2; //-zuoyou+qianhou
  weizhi1[4] = weizhi[4] * 1.3    + zuoyou + qianhou-o2 ; //+zuoyou
  weizhi1[6] = weizhi[6] * 1.3  - zuoyou + qianhou+o2; //-zuoyou



  /*
    float L2I[4]  ; //
    float DL0[4]  ; //
    float L02I[4]  ; //
    float SITA [4]; //
    float AERFA[4]  ; //
    float BAITA [4] ; //




    for (int n = 0; n <= 7; n++)
    {
    weizhi1[n] = 0;

    }


    for (int n = 0; n <= 7; n = n + 2)
    {
    weizhi1[n + 1] = j * 40;

    }
    delay(100);
  */


 for (int n = 0; n <= 6; n = n + 2)//**
  {
    if (weizhi1[n] > 500)weizhi1[n]  = 500;
    if (weizhi1[n] < -295)weizhi1[n]  = -295;
  }

 for (int n = 1; n <= 7; n = n + 2)//**
  {
    if (weizhi1[n] > 490)weizhi1[n]  = 490;
    if (weizhi1[n] < -495)weizhi1[n]  = -495;
  }



  for (int n = 0; n <= 6; n = n + 2)//**
  {

    L2I[n] = sqrt((1100 - weizhi1[n] ) * (1100 - weizhi1[n] ) + weizhi1[n + 1] * weizhi1[n + 1]) / 1500; //
    DL0[n] = weizhi1[n + 1] / (1100 - weizhi1[n] );
    L02I[n] = 1100 / 1500; //******

    SITA[n] = acos(L02I[n]); //*******
    AERFA[n] = atan(DL0[n]); //
    BAITA[n] = acos( L2I[n]); //



    //weizhi2[n] = (AERFA[n] +SITA[n]- BAITA[n]) * 80 ;
    //weizhi2[n + 1] = (2 * SITA[n]  - 2 * BAITA[n]) * 80;

    weizhi2[n] = (AERFA[n] + SITA[n] - BAITA[n]) * 80-qianhou/100;
    weizhi2[n + 1] = (2 * SITA[n]  - 2 * BAITA[n]) * 80;
  }
  /*
    Serial.print(" 1-weizhi1[1]  ");
    Serial.print(  weizhi1[1]  );
    Serial.print("  weizhi2[0]    ");
    Serial.print(  weizhi2[0]    );
    Serial.print("  AERFA[0]   ");
    Serial.println(  AERFA[0]   );


      Serial.print("    AERFA[4]  ");
       Serial.println(  AERFA[4]   );
       Serial.print("      BAITA[4] ");
       Serial.println(  BAITA[4]);

*/


  fangxiang[0] = 285 - weizhi2[0] + tt[0] ; //134-174-215加大往后
  fangxiang[1] = 265 + weizhi2[1] + tt[1]  ; //134-174-215
  fangxiang[2] = 245 + weizhi2[2] + tt[2] ; //减小往后
  fangxiang[3] = 265 - weizhi2[3] + tt[3];
  fangxiang[4] = 285 - weizhi2[4] + tt[4]; //加大往后
  fangxiang[5] = 265 + weizhi2[5] + tt[5];
  fangxiang[6] = 245 + weizhi2[6] + tt[6]; //减小往后
  fangxiang[7] = 265 - weizhi2[7] + tt[7];

/*
  for (int n = 0; n <= 7; n++)
  {
    if (fangxiang[n] >= 450)fangxiang[n]  = 80;
    fangxiang[n]=fangxiang[n]+1;
       Serial.print(n);
       Serial.print("  -- ");
       Serial.print(  fangxiang[n]);
         Serial.print("  /");
  }
     Serial.println( "");

  */


  for (int n = 0; n <= 7; n++)
  {
    if (fangxiang[n] > 400)fangxiang[n]  = 400;
    if (fangxiang[n] < 100)fangxiang[n]  = 100;
    pwm.setPWM(n, 0, fangxiang[n]);

  }

}


int zhanli()//
{
  LEG_kongzhizhuangliuliu[	0 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	0 	][	1 	]	=	10 	;
LEG_kongzhizhuangliuliu[	0 	][	2 	]	=	20 	;
LEG_kongzhizhuangliuliu[	0 	][	3 	]	=	30 	;
LEG_kongzhizhuangliuliu[	0 	][	4 	]	=	30 	;
LEG_kongzhizhuangliuliu[	0 	][	5 	]	=	20 	;
LEG_kongzhizhuangliuliu[	0 	][	6 	]	=	10 	;
LEG_kongzhizhuangliuliu[	0 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	0 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	0 	][	9 	]	=	10 	;
LEG_kongzhizhuangliuliu[	0 	][	10 	]	=	20 	;
LEG_kongzhizhuangliuliu[	0 	][	11 	]	=	30 	;
LEG_kongzhizhuangliuliu[	0 	][	12 	]	=	30 	;
LEG_kongzhizhuangliuliu[	0 	][	13 	]	=	20 	;
LEG_kongzhizhuangliuliu[	0 	][	14 	]	=	10 	;
LEG_kongzhizhuangliuliu[	0 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	1 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	2 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	3 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	4 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	5 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	6 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	9 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	10 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	11 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	12 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	13 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	14 	]	=	0 	;
LEG_kongzhizhuangliuliu[	1 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	2 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	2 	][	1 	]	=	10 	;
LEG_kongzhizhuangliuliu[	2 	][	2 	]	=	20 	;
LEG_kongzhizhuangliuliu[	2 	][	3 	]	=	30 	;
LEG_kongzhizhuangliuliu[	2 	][	4 	]	=	30 	;
LEG_kongzhizhuangliuliu[	2 	][	5 	]	=	20 	;
LEG_kongzhizhuangliuliu[	2 	][	6 	]	=	10 	;
LEG_kongzhizhuangliuliu[	2 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	2 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	2 	][	9 	]	=	10 	;
LEG_kongzhizhuangliuliu[	2 	][	10 	]	=	20 	;
LEG_kongzhizhuangliuliu[	2 	][	11 	]	=	30 	;
LEG_kongzhizhuangliuliu[	2 	][	12 	]	=	30 	;
LEG_kongzhizhuangliuliu[	2 	][	13 	]	=	20 	;
LEG_kongzhizhuangliuliu[	2 	][	14 	]	=	10 	;
LEG_kongzhizhuangliuliu[	2 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	1 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	2 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	3 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	4 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	5 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	6 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	9 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	10 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	11 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	12 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	13 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	14 	]	=	0 	;
LEG_kongzhizhuangliuliu[	3 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	4 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	4 	][	1 	]	=	10 	;
LEG_kongzhizhuangliuliu[	4 	][	2 	]	=	20 	;
LEG_kongzhizhuangliuliu[	4 	][	3 	]	=	30 	;
LEG_kongzhizhuangliuliu[	4 	][	4 	]	=	30 	;
LEG_kongzhizhuangliuliu[	4 	][	5 	]	=	20 	;
LEG_kongzhizhuangliuliu[	4 	][	6 	]	=	10 	;
LEG_kongzhizhuangliuliu[	4 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	4 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	4 	][	9 	]	=	10 	;
LEG_kongzhizhuangliuliu[	4 	][	10 	]	=	20 	;
LEG_kongzhizhuangliuliu[	4 	][	11 	]	=	30 	;
LEG_kongzhizhuangliuliu[	4 	][	12 	]	=	30 	;
LEG_kongzhizhuangliuliu[	4 	][	13 	]	=	20 	;
LEG_kongzhizhuangliuliu[	4 	][	14 	]	=	10 	;
LEG_kongzhizhuangliuliu[	4 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	1 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	2 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	3 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	4 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	5 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	6 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	9 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	10 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	11 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	12 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	13 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	14 	]	=	0 	;
LEG_kongzhizhuangliuliu[	5 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	6 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	6 	][	1 	]	=	10 	;
LEG_kongzhizhuangliuliu[	6 	][	2 	]	=	20 	;
LEG_kongzhizhuangliuliu[	6 	][	3 	]	=	30 	;
LEG_kongzhizhuangliuliu[	6 	][	4 	]	=	30 	;
LEG_kongzhizhuangliuliu[	6 	][	5 	]	=	20 	;
LEG_kongzhizhuangliuliu[	6 	][	6 	]	=	10 	;
LEG_kongzhizhuangliuliu[	6 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	6 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	6 	][	9 	]	=	10 	;
LEG_kongzhizhuangliuliu[	6 	][	10 	]	=	20 	;
LEG_kongzhizhuangliuliu[	6 	][	11 	]	=	30 	;
LEG_kongzhizhuangliuliu[	6 	][	12 	]	=	30 	;
LEG_kongzhizhuangliuliu[	6 	][	13 	]	=	20 	;
LEG_kongzhizhuangliuliu[	6 	][	14 	]	=	10 	;
LEG_kongzhizhuangliuliu[	6 	][	15 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	0 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	1 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	2 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	3 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	4 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	5 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	6 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	7 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	8 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	9 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	10 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	11 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	12 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	13 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	14 	]	=	0 	;
LEG_kongzhizhuangliuliu[	7 	][	15 	]	=	0 	;


}
int zou()//
{
  LEG_kongzhizhuangliuliu[ 0   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  12  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  13  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  14  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  0   ] = 277   ;
  LEG_kongzhizhuangliuliu[  1   ][  1   ] = 215   ;
  LEG_kongzhizhuangliuliu[  1   ][  2   ] = 154   ;
  LEG_kongzhizhuangliuliu[  1   ][  3   ] = 92  ;
  LEG_kongzhizhuangliuliu[  1   ][  4   ] = 31  ;
  LEG_kongzhizhuangliuliu[  1   ][  5   ] = -31   ;
  LEG_kongzhizhuangliuliu[  1   ][  6   ] = -92   ;
  LEG_kongzhizhuangliuliu[  1   ][  7   ] = -154  ;
  LEG_kongzhizhuangliuliu[  1   ][  8   ] = -215  ;
  LEG_kongzhizhuangliuliu[  1   ][  9   ] = -277  ;
  LEG_kongzhizhuangliuliu[  1   ][  10  ] = -338  ;
  LEG_kongzhizhuangliuliu[  1   ][  11  ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  12  ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  14  ] = 400   ;
  LEG_kongzhizhuangliuliu[  1   ][  15  ] = 338   ;
  LEG_kongzhizhuangliuliu[  2   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  4   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  5   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  6   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  0   ] = -215  ;
  LEG_kongzhizhuangliuliu[  3   ][  1   ] = -277  ;
  LEG_kongzhizhuangliuliu[  3   ][  2   ] = -338  ;
  LEG_kongzhizhuangliuliu[  3   ][  3   ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  4   ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  6   ] = 400   ;
  LEG_kongzhizhuangliuliu[  3   ][  7   ] = 338   ;
  LEG_kongzhizhuangliuliu[  3   ][  8   ] = 277   ;
  LEG_kongzhizhuangliuliu[  3   ][  9   ] = 215   ;
  LEG_kongzhizhuangliuliu[  3   ][  10  ] = 154   ;
  LEG_kongzhizhuangliuliu[  3   ][  11  ] = 92  ;
  LEG_kongzhizhuangliuliu[  3   ][  12  ] = 31  ;
  LEG_kongzhizhuangliuliu[  3   ][  13  ] = -31   ;
  LEG_kongzhizhuangliuliu[  3   ][  14  ] = -92   ;
  LEG_kongzhizhuangliuliu[  3   ][  15  ] = -154  ;
  LEG_kongzhizhuangliuliu[  4   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  8   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  9   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  10  ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  0   ] = 31  ;
  LEG_kongzhizhuangliuliu[  5   ][  1   ] = -31   ;
  LEG_kongzhizhuangliuliu[  5   ][  2   ] = -92   ;
  LEG_kongzhizhuangliuliu[  5   ][  3   ] = -154  ;
  LEG_kongzhizhuangliuliu[  5   ][  4   ] = -215  ;
  LEG_kongzhizhuangliuliu[  5   ][  5   ] = -277  ;
  LEG_kongzhizhuangliuliu[  5   ][  6   ] = -338  ;
  LEG_kongzhizhuangliuliu[  5   ][  7   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  8   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  10  ] = 400   ;
  LEG_kongzhizhuangliuliu[  5   ][  11  ] = 338   ;
  LEG_kongzhizhuangliuliu[  5   ][  12  ] = 277   ;
  LEG_kongzhizhuangliuliu[  5   ][  13  ] = 215   ;
  LEG_kongzhizhuangliuliu[  5   ][  14  ] = 154   ;
  LEG_kongzhizhuangliuliu[  5   ][  15  ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  0   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  1   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  2   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  0   ] = -400  ;
  LEG_kongzhizhuangliuliu[  7   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  2   ] = 400   ;
  LEG_kongzhizhuangliuliu[  7   ][  3   ] = 338   ;
  LEG_kongzhizhuangliuliu[  7   ][  4   ] = 277   ;
  LEG_kongzhizhuangliuliu[  7   ][  5   ] = 215   ;
  LEG_kongzhizhuangliuliu[  7   ][  6   ] = 154   ;
  LEG_kongzhizhuangliuliu[  7   ][  7   ] = 92  ;
  LEG_kongzhizhuangliuliu[  7   ][  8   ] = 31  ;
  LEG_kongzhizhuangliuliu[  7   ][  9   ] = -31   ;
  LEG_kongzhizhuangliuliu[  7   ][  10  ] = -92   ;
  LEG_kongzhizhuangliuliu[  7   ][  11  ] = -154  ;
  LEG_kongzhizhuangliuliu[  7   ][  12  ] = -215  ;
  LEG_kongzhizhuangliuliu[  7   ][  13  ] = -277  ;
  LEG_kongzhizhuangliuliu[  7   ][  14  ] = -338  ;
  LEG_kongzhizhuangliuliu[  7   ][  15  ] = -400  ;



}

int kuaizou() //
{
 LEG_kongzhizhuangliuliu[  0   ][  0   ] = 100   ;
LEG_kongzhizhuangliuliu[  0   ][  1   ] = 200   ;
LEG_kongzhizhuangliuliu[  0   ][  2   ] = 200   ;
LEG_kongzhizhuangliuliu[  0   ][  3   ] = 100   ;
LEG_kongzhizhuangliuliu[  0   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  8   ] = 100   ;
LEG_kongzhizhuangliuliu[  0   ][  9   ] = 200   ;
LEG_kongzhizhuangliuliu[  0   ][  10  ] = 200   ;
LEG_kongzhizhuangliuliu[  0   ][  11  ] = 100   ;
LEG_kongzhizhuangliuliu[  0   ][  12  ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  13  ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  14  ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  15  ] = 0   ;
LEG_kongzhizhuangliuliu[  1   ][  0   ] = -300  ;
LEG_kongzhizhuangliuliu[  1   ][  1   ] = -100  ;
LEG_kongzhizhuangliuliu[  1   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  3   ] = 300   ;
LEG_kongzhizhuangliuliu[  1   ][  4   ] = 300   ;
LEG_kongzhizhuangliuliu[  1   ][  5   ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  6   ] = -100  ;
LEG_kongzhizhuangliuliu[  1   ][  7   ] = -300  ;
LEG_kongzhizhuangliuliu[  1   ][  8   ] = -300  ;
LEG_kongzhizhuangliuliu[  1   ][  9   ] = -100  ;
LEG_kongzhizhuangliuliu[  1   ][  10  ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  11  ] = 300   ;
LEG_kongzhizhuangliuliu[  1   ][  12  ] = 300   ;
LEG_kongzhizhuangliuliu[  1   ][  13  ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  14  ] = -100  ;
LEG_kongzhizhuangliuliu[  1   ][  15  ] = -300  ;
LEG_kongzhizhuangliuliu[  2   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  4   ] = 100   ;
LEG_kongzhizhuangliuliu[  2   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  2   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  2   ][  7   ] = 100   ;
LEG_kongzhizhuangliuliu[  2   ][  8   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  9   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  10  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  11  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  12  ] = 100   ;
LEG_kongzhizhuangliuliu[  2   ][  13  ] = 200   ;
LEG_kongzhizhuangliuliu[  2   ][  14  ] = 200   ;
LEG_kongzhizhuangliuliu[  2   ][  15  ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  0   ] = 300   ;
LEG_kongzhizhuangliuliu[  3   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  2   ] = -100  ;
LEG_kongzhizhuangliuliu[  3   ][  3   ] = -300  ;
LEG_kongzhizhuangliuliu[  3   ][  4   ] = -300  ;
LEG_kongzhizhuangliuliu[  3   ][  5   ] = -100  ;
LEG_kongzhizhuangliuliu[  3   ][  6   ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  7   ] = 300   ;
LEG_kongzhizhuangliuliu[  3   ][  8   ] = 300   ;
LEG_kongzhizhuangliuliu[  3   ][  9   ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  10  ] = -100  ;
LEG_kongzhizhuangliuliu[  3   ][  11  ] = -300  ;
LEG_kongzhizhuangliuliu[  3   ][  12  ] = -300  ;
LEG_kongzhizhuangliuliu[  3   ][  13  ] = -100  ;
LEG_kongzhizhuangliuliu[  3   ][  14  ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  15  ] = 300   ;
LEG_kongzhizhuangliuliu[  4   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  4   ] = 100   ;
LEG_kongzhizhuangliuliu[  4   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  4   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  4   ][  7   ] = 100   ;
LEG_kongzhizhuangliuliu[  4   ][  8   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  9   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  10  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  11  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  12  ] = 100   ;
LEG_kongzhizhuangliuliu[  4   ][  13  ] = 200   ;
LEG_kongzhizhuangliuliu[  4   ][  14  ] = 200   ;
LEG_kongzhizhuangliuliu[  4   ][  15  ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  0   ] = 300   ;
LEG_kongzhizhuangliuliu[  5   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  2   ] = -100  ;
LEG_kongzhizhuangliuliu[  5   ][  3   ] = -300  ;
LEG_kongzhizhuangliuliu[  5   ][  4   ] = -300  ;
LEG_kongzhizhuangliuliu[  5   ][  5   ] = -100  ;
LEG_kongzhizhuangliuliu[  5   ][  6   ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  7   ] = 300   ;
LEG_kongzhizhuangliuliu[  5   ][  8   ] = 300   ;
LEG_kongzhizhuangliuliu[  5   ][  9   ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  10  ] = -100  ;
LEG_kongzhizhuangliuliu[  5   ][  11  ] = -300  ;
LEG_kongzhizhuangliuliu[  5   ][  12  ] = -300  ;
LEG_kongzhizhuangliuliu[  5   ][  13  ] = -100  ;
LEG_kongzhizhuangliuliu[  5   ][  14  ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  15  ] = 300   ;
LEG_kongzhizhuangliuliu[  6   ][  0   ] = 100   ;
LEG_kongzhizhuangliuliu[  6   ][  1   ] = 200   ;
LEG_kongzhizhuangliuliu[  6   ][  2   ] = 200   ;
LEG_kongzhizhuangliuliu[  6   ][  3   ] = 100   ;
LEG_kongzhizhuangliuliu[  6   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  8   ] = 100   ;
LEG_kongzhizhuangliuliu[  6   ][  9   ] = 200   ;
LEG_kongzhizhuangliuliu[  6   ][  10  ] = 200   ;
LEG_kongzhizhuangliuliu[  6   ][  11  ] = 100   ;
LEG_kongzhizhuangliuliu[  6   ][  12  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  13  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  14  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
LEG_kongzhizhuangliuliu[  7   ][  0   ] = -300  ;
LEG_kongzhizhuangliuliu[  7   ][  1   ] = -100  ;
LEG_kongzhizhuangliuliu[  7   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  3   ] = 300   ;
LEG_kongzhizhuangliuliu[  7   ][  4   ] = 300   ;
LEG_kongzhizhuangliuliu[  7   ][  5   ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  6   ] = -100  ;
LEG_kongzhizhuangliuliu[  7   ][  7   ] = -300  ;
LEG_kongzhizhuangliuliu[  7   ][  8   ] = -300  ;
LEG_kongzhizhuangliuliu[  7   ][  9   ] = -100  ;
LEG_kongzhizhuangliuliu[  7   ][  10  ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  11  ] = 300   ;
LEG_kongzhizhuangliuliu[  7   ][  12  ] = 300   ;
LEG_kongzhizhuangliuliu[  7   ][  13  ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  14  ] = -100  ;
LEG_kongzhizhuangliuliu[  7   ][  15  ] = -300  ;


}
int houtui() //
{
  LEG_kongzhizhuangliuliu[ 0   ][  0   ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  1   ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  2   ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  3   ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  0   ] = 400   ;
  LEG_kongzhizhuangliuliu[  1   ][  1   ] = 135   ;
  LEG_kongzhizhuangliuliu[  1   ][  2   ] = -135  ;
  LEG_kongzhizhuangliuliu[  1   ][  3   ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  4   ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  5   ] = -329  ;
  LEG_kongzhizhuangliuliu[  1   ][  6   ] = -257  ;
  LEG_kongzhizhuangliuliu[  1   ][  7   ] = -184  ;
  LEG_kongzhizhuangliuliu[  1   ][  8   ] = -111  ;
  LEG_kongzhizhuangliuliu[  1   ][  9   ] = -37   ;
  LEG_kongzhizhuangliuliu[  1   ][  10  ] = 37  ;
  LEG_kongzhizhuangliuliu[  1   ][  11  ] = 111   ;
  LEG_kongzhizhuangliuliu[  1   ][  12  ] = 184   ;
  LEG_kongzhizhuangliuliu[  1   ][  13  ] = 257   ;
  LEG_kongzhizhuangliuliu[  1   ][  14  ] = 329   ;
  LEG_kongzhizhuangliuliu[  1   ][  15  ] = 400   ;
  LEG_kongzhizhuangliuliu[  2   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  8   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  9   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  10  ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  11  ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  0   ] = -111  ;
  LEG_kongzhizhuangliuliu[  3   ][  1   ] = -37   ;
  LEG_kongzhizhuangliuliu[  3   ][  2   ] = 37  ;
  LEG_kongzhizhuangliuliu[  3   ][  3   ] = 111   ;
  LEG_kongzhizhuangliuliu[  3   ][  4   ] = 184   ;
  LEG_kongzhizhuangliuliu[  3   ][  5   ] = 257   ;
  LEG_kongzhizhuangliuliu[  3   ][  6   ] = 329   ;
  LEG_kongzhizhuangliuliu[  3   ][  7   ] = 400   ;
  LEG_kongzhizhuangliuliu[  3   ][  8   ] = 400   ;
  LEG_kongzhizhuangliuliu[  3   ][  9   ] = 135   ;
  LEG_kongzhizhuangliuliu[  3   ][  10  ] = -135  ;
  LEG_kongzhizhuangliuliu[  3   ][  11  ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  12  ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  13  ] = -329  ;
  LEG_kongzhizhuangliuliu[  3   ][  14  ] = -257  ;
  LEG_kongzhizhuangliuliu[  3   ][  15  ] = -184  ;
  LEG_kongzhizhuangliuliu[  4   ][  0   ] = 73  ;
  LEG_kongzhizhuangliuliu[  4   ][  1   ] = 55  ;
  LEG_kongzhizhuangliuliu[  4   ][  2   ] = 30  ;
  LEG_kongzhizhuangliuliu[  4   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  4   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  5   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  6   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  7   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  0   ] = 184   ;
  LEG_kongzhizhuangliuliu[  5   ][  1   ] = 257   ;
  LEG_kongzhizhuangliuliu[  5   ][  2   ] = 329   ;
  LEG_kongzhizhuangliuliu[  5   ][  3   ] = 400   ;
  LEG_kongzhizhuangliuliu[  5   ][  4   ] = 400   ;
  LEG_kongzhizhuangliuliu[  5   ][  5   ] = 135   ;
  LEG_kongzhizhuangliuliu[  5   ][  6   ] = -135  ;
  LEG_kongzhizhuangliuliu[  5   ][  7   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  8   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  9   ] = -329  ;
  LEG_kongzhizhuangliuliu[  5   ][  10  ] = -257  ;
  LEG_kongzhizhuangliuliu[  5   ][  11  ] = -184  ;
  LEG_kongzhizhuangliuliu[  5   ][  12  ] = -111  ;
  LEG_kongzhizhuangliuliu[  5   ][  13  ] = -37   ;
  LEG_kongzhizhuangliuliu[  5   ][  14  ] = 37  ;
  LEG_kongzhizhuangliuliu[  5   ][  15  ] = 111   ;
  LEG_kongzhizhuangliuliu[  6   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  12  ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  13  ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  14  ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  15  ] = 250   ;
  LEG_kongzhizhuangliuliu[  7   ][  0   ] = -400  ;
  LEG_kongzhizhuangliuliu[  7   ][  1   ] = -329  ;
  LEG_kongzhizhuangliuliu[  7   ][  2   ] = -257  ;
  LEG_kongzhizhuangliuliu[  7   ][  3   ] = -184  ;
  LEG_kongzhizhuangliuliu[  7   ][  4   ] = -111  ;
  LEG_kongzhizhuangliuliu[  7   ][  5   ] = -37   ;
  LEG_kongzhizhuangliuliu[  7   ][  6   ] = 37  ;
  LEG_kongzhizhuangliuliu[  7   ][  7   ] = 111   ;
  LEG_kongzhizhuangliuliu[  7   ][  8   ] = 184   ;
  LEG_kongzhizhuangliuliu[  7   ][  9   ] = 257   ;
  LEG_kongzhizhuangliuliu[  7   ][  10  ] = 329   ;
  LEG_kongzhizhuangliuliu[  7   ][  11  ] = 400   ;
  LEG_kongzhizhuangliuliu[  7   ][  12  ] = 400   ;
  LEG_kongzhizhuangliuliu[  7   ][  13  ] = 135   ;
  LEG_kongzhizhuangliuliu[  7   ][  14  ] = -135  ;
  LEG_kongzhizhuangliuliu[  7   ][  15  ] = -400  ;

}
int shensuo()//
{
  LEG_kongzhizhuangliuliu[ 0 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  0 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  0 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  0 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  0 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  0 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  0 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  0 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  0 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  2 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  2 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  2 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  2 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  2 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  2 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  2 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  2 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  4 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  4 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  4 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  4 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  4 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  4 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  4 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  4 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  6 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  6 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  6 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  6 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  6 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  6 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  6 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  6 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  15  ] = 0 ;


}
int qianshen()//
{
  LEG_kongzhizhuangliuliu[  0 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  0 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  0 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  0 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  0 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  0 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  0 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  0 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  0 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  2 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  2 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  2 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  2 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  2 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  2 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  2 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  2 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  15  ] = 0 ;



}
int houshen()//
{
  LEG_kongzhizhuangliuliu[  0 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  0 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  1 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  2 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  3 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  4 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  4 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  4 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  4 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  4 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  4 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  4 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  4 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  4 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  5 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  0 ] = 200 ;
  LEG_kongzhizhuangliuliu[  6 ][  1 ] = 300 ;
  LEG_kongzhizhuangliuliu[  6 ][  2 ] = 400 ;
  LEG_kongzhizhuangliuliu[  6 ][  3 ] = 500 ;
  LEG_kongzhizhuangliuliu[  6 ][  4 ] = 500 ;
  LEG_kongzhizhuangliuliu[  6 ][  5 ] = 400 ;
  LEG_kongzhizhuangliuliu[  6 ][  6 ] = 300 ;
  LEG_kongzhizhuangliuliu[  6 ][  7 ] = 200 ;
  LEG_kongzhizhuangliuliu[  6 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  6 ][  15  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  0 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  1 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  2 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  3 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  4 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  5 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  6 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  7 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  8 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  9 ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  10  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  11  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  12  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  13  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  14  ] = 0 ;
  LEG_kongzhizhuangliuliu[  7 ][  15  ] = 0 ;


}
int zuozhuan()//
{
  LEG_kongzhizhuangliuliu[ 0   ][  0   ] = 100   ;
  LEG_kongzhizhuangliuliu[  0   ][  1   ] = 30  ;
  LEG_kongzhizhuangliuliu[  0   ][  2   ] = 55  ;
  LEG_kongzhizhuangliuliu[  0   ][  3   ] = 73  ;
  LEG_kongzhizhuangliuliu[  0   ][  4   ] = 86  ;
  LEG_kongzhizhuangliuliu[  0   ][  5   ] = 92  ;
  LEG_kongzhizhuangliuliu[  0   ][  6   ] = 92  ;
  LEG_kongzhizhuangliuliu[  0   ][  7   ] = 86  ;
  LEG_kongzhizhuangliuliu[  0   ][  8   ] = 73  ;
  LEG_kongzhizhuangliuliu[  0   ][  9   ] = 55  ;
  LEG_kongzhizhuangliuliu[  0   ][  10  ] = 30  ;
  LEG_kongzhizhuangliuliu[  0   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  12  ] = 200   ;
  LEG_kongzhizhuangliuliu[  0   ][  13  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  14  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  15  ] = 200   ;
  LEG_kongzhizhuangliuliu[  1   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  1   ][  1   ] = 165   ;
  LEG_kongzhizhuangliuliu[  1   ][  2   ] = 129   ;
  LEG_kongzhizhuangliuliu[  1   ][  3   ] = 92  ;
  LEG_kongzhizhuangliuliu[  1   ][  4   ] = 55  ;
  LEG_kongzhizhuangliuliu[  1   ][  5   ] = 19  ;
  LEG_kongzhizhuangliuliu[  1   ][  6   ] = -19   ;
  LEG_kongzhizhuangliuliu[  1   ][  7   ] = -55   ;
  LEG_kongzhizhuangliuliu[  1   ][  8   ] = -92   ;
  LEG_kongzhizhuangliuliu[  1   ][  9   ] = -129  ;
  LEG_kongzhizhuangliuliu[  1   ][  10  ] = -165  ;
  LEG_kongzhizhuangliuliu[  1   ][  11  ] = -200  ;
  LEG_kongzhizhuangliuliu[  1   ][  12  ] = -200  ;
  LEG_kongzhizhuangliuliu[  1   ][  13  ] = -68   ;
  LEG_kongzhizhuangliuliu[  1   ][  14  ] = 68  ;
  LEG_kongzhizhuangliuliu[  1   ][  15  ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  0   ] = 73  ;
  LEG_kongzhizhuangliuliu[  2   ][  1   ] = 55  ;
  LEG_kongzhizhuangliuliu[  2   ][  2   ] = 30  ;
  LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  4   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  5   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  6   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  8   ] = 100   ;
  LEG_kongzhizhuangliuliu[  2   ][  9   ] = 30  ;
  LEG_kongzhizhuangliuliu[  2   ][  10  ] = 55  ;
  LEG_kongzhizhuangliuliu[  2   ][  11  ] = 73  ;
  LEG_kongzhizhuangliuliu[  2   ][  12  ] = 86  ;
  LEG_kongzhizhuangliuliu[  2   ][  13  ] = 92  ;
  LEG_kongzhizhuangliuliu[  2   ][  14  ] = 92  ;
  LEG_kongzhizhuangliuliu[  2   ][  15  ] = 86  ;
  LEG_kongzhizhuangliuliu[  3   ][  0   ] = -184  ;
  LEG_kongzhizhuangliuliu[  3   ][  1   ] = -257  ;
  LEG_kongzhizhuangliuliu[  3   ][  2   ] = -329  ;
  LEG_kongzhizhuangliuliu[  3   ][  3   ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  4   ] = -400  ;
  LEG_kongzhizhuangliuliu[  3   ][  5   ] = -135  ;
  LEG_kongzhizhuangliuliu[  3   ][  6   ] = 135   ;
  LEG_kongzhizhuangliuliu[  3   ][  7   ] = 400   ;
  LEG_kongzhizhuangliuliu[  3   ][  8   ] = 400   ;
  LEG_kongzhizhuangliuliu[  3   ][  9   ] = 329   ;
  LEG_kongzhizhuangliuliu[  3   ][  10  ] = 257   ;
  LEG_kongzhizhuangliuliu[  3   ][  11  ] = 184   ;
  LEG_kongzhizhuangliuliu[  3   ][  12  ] = 111   ;
  LEG_kongzhizhuangliuliu[  3   ][  13  ] = 37  ;
  LEG_kongzhizhuangliuliu[  3   ][  14  ] = -37   ;
  LEG_kongzhizhuangliuliu[  3   ][  15  ] = -111  ;
  LEG_kongzhizhuangliuliu[  4   ][  0   ] = 86  ;
  LEG_kongzhizhuangliuliu[  4   ][  1   ] = 92  ;
  LEG_kongzhizhuangliuliu[  4   ][  2   ] = 92  ;
  LEG_kongzhizhuangliuliu[  4   ][  3   ] = 86  ;
  LEG_kongzhizhuangliuliu[  4   ][  4   ] = 73  ;
  LEG_kongzhizhuangliuliu[  4   ][  5   ] = 55  ;
  LEG_kongzhizhuangliuliu[  4   ][  6   ] = 30  ;
  LEG_kongzhizhuangliuliu[  4   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  8   ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  9   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  10  ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  11  ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  12  ] = 100   ;
  LEG_kongzhizhuangliuliu[  4   ][  13  ] = 30  ;
  LEG_kongzhizhuangliuliu[  4   ][  14  ] = 55  ;
  LEG_kongzhizhuangliuliu[  4   ][  15  ] = 73  ;
  LEG_kongzhizhuangliuliu[  5   ][  0   ] = 55  ;
  LEG_kongzhizhuangliuliu[  5   ][  1   ] = 19  ;
  LEG_kongzhizhuangliuliu[  5   ][  2   ] = -19   ;
  LEG_kongzhizhuangliuliu[  5   ][  3   ] = -55   ;
  LEG_kongzhizhuangliuliu[  5   ][  4   ] = -92   ;
  LEG_kongzhizhuangliuliu[  5   ][  5   ] = -129  ;
  LEG_kongzhizhuangliuliu[  5   ][  6   ] = -165  ;
  LEG_kongzhizhuangliuliu[  5   ][  7   ] = -200  ;
  LEG_kongzhizhuangliuliu[  5   ][  8   ] = -200  ;
  LEG_kongzhizhuangliuliu[  5   ][  9   ] = -68   ;
  LEG_kongzhizhuangliuliu[  5   ][  10  ] = 68  ;
  LEG_kongzhizhuangliuliu[  5   ][  11  ] = 200   ;
  LEG_kongzhizhuangliuliu[  5   ][  12  ] = 200   ;
  LEG_kongzhizhuangliuliu[  5   ][  13  ] = 165   ;
  LEG_kongzhizhuangliuliu[  5   ][  14  ] = 129   ;
  LEG_kongzhizhuangliuliu[  5   ][  15  ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  1   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  2   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  3   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  4   ] = 100   ;
  LEG_kongzhizhuangliuliu[  6   ][  5   ] = 30  ;
  LEG_kongzhizhuangliuliu[  6   ][  6   ] = 55  ;
  LEG_kongzhizhuangliuliu[  6   ][  7   ] = 73  ;
  LEG_kongzhizhuangliuliu[  6   ][  8   ] = 86  ;
  LEG_kongzhizhuangliuliu[  6   ][  9   ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  10  ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  11  ] = 86  ;
  LEG_kongzhizhuangliuliu[  6   ][  12  ] = 73  ;
  LEG_kongzhizhuangliuliu[  6   ][  13  ] = 55  ;
  LEG_kongzhizhuangliuliu[  6   ][  14  ] = 30  ;
  LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  0   ] = -400  ;
  LEG_kongzhizhuangliuliu[  7   ][  1   ] = -135  ;
  LEG_kongzhizhuangliuliu[  7   ][  2   ] = 135   ;
  LEG_kongzhizhuangliuliu[  7   ][  3   ] = 400   ;
  LEG_kongzhizhuangliuliu[  7   ][  4   ] = 400   ;
  LEG_kongzhizhuangliuliu[  7   ][  5   ] = 329   ;
  LEG_kongzhizhuangliuliu[  7   ][  6   ] = 257   ;
  LEG_kongzhizhuangliuliu[  7   ][  7   ] = 184   ;
  LEG_kongzhizhuangliuliu[  7   ][  8   ] = 111   ;
  LEG_kongzhizhuangliuliu[  7   ][  9   ] = 37  ;
  LEG_kongzhizhuangliuliu[  7   ][  10  ] = -37   ;
  LEG_kongzhizhuangliuliu[  7   ][  11  ] = -111  ;
  LEG_kongzhizhuangliuliu[  7   ][  12  ] = -184  ;
  LEG_kongzhizhuangliuliu[  7   ][  13  ] = -257  ;
  LEG_kongzhizhuangliuliu[  7   ][  14  ] = -329  ;
  LEG_kongzhizhuangliuliu[  7   ][  15  ] = -400  ;



}
int youzhuan()//
{
  LEG_kongzhizhuangliuliu[ 0   ][  0   ] = 100   ;
  LEG_kongzhizhuangliuliu[  0   ][  1   ] = 30  ;
  LEG_kongzhizhuangliuliu[  0   ][  2   ] = 55  ;
  LEG_kongzhizhuangliuliu[  0   ][  3   ] = 73  ;
  LEG_kongzhizhuangliuliu[  0   ][  4   ] = 86  ;
  LEG_kongzhizhuangliuliu[  0   ][  5   ] = 92  ;
  LEG_kongzhizhuangliuliu[  0   ][  6   ] = 92  ;
  LEG_kongzhizhuangliuliu[  0   ][  7   ] = 86  ;
  LEG_kongzhizhuangliuliu[  0   ][  8   ] = 73  ;
  LEG_kongzhizhuangliuliu[  0   ][  9   ] = 55  ;
  LEG_kongzhizhuangliuliu[  0   ][  10  ] = 30  ;
  LEG_kongzhizhuangliuliu[  0   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  12  ] = 200   ;
  LEG_kongzhizhuangliuliu[  0   ][  13  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  14  ] = 250   ;
  LEG_kongzhizhuangliuliu[  0   ][  15  ] = 200   ;
  LEG_kongzhizhuangliuliu[  1   ][  0   ] = 400   ;
  LEG_kongzhizhuangliuliu[  1   ][  1   ] = 329   ;
  LEG_kongzhizhuangliuliu[  1   ][  2   ] = 257   ;
  LEG_kongzhizhuangliuliu[  1   ][  3   ] = 184   ;
  LEG_kongzhizhuangliuliu[  1   ][  4   ] = 111   ;
  LEG_kongzhizhuangliuliu[  1   ][  5   ] = 37  ;
  LEG_kongzhizhuangliuliu[  1   ][  6   ] = -37   ;
  LEG_kongzhizhuangliuliu[  1   ][  7   ] = -111  ;
  LEG_kongzhizhuangliuliu[  1   ][  8   ] = -184  ;
  LEG_kongzhizhuangliuliu[  1   ][  9   ] = -257  ;
  LEG_kongzhizhuangliuliu[  1   ][  10  ] = -329  ;
  LEG_kongzhizhuangliuliu[  1   ][  11  ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  12  ] = -400  ;
  LEG_kongzhizhuangliuliu[  1   ][  13  ] = -135  ;
  LEG_kongzhizhuangliuliu[  1   ][  14  ] = 135   ;
  LEG_kongzhizhuangliuliu[  1   ][  15  ] = 400   ;
  LEG_kongzhizhuangliuliu[  2   ][  0   ] = 73  ;
  LEG_kongzhizhuangliuliu[  2   ][  1   ] = 55  ;
  LEG_kongzhizhuangliuliu[  2   ][  2   ] = 30  ;
  LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  4   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  5   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  6   ] = 250   ;
  LEG_kongzhizhuangliuliu[  2   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  8   ] = 100   ;
  LEG_kongzhizhuangliuliu[  2   ][  9   ] = 30  ;
  LEG_kongzhizhuangliuliu[  2   ][  10  ] = 55  ;
  LEG_kongzhizhuangliuliu[  2   ][  11  ] = 73  ;
  LEG_kongzhizhuangliuliu[  2   ][  12  ] = 86  ;
  LEG_kongzhizhuangliuliu[  2   ][  13  ] = 92  ;
  LEG_kongzhizhuangliuliu[  2   ][  14  ] = 92  ;
  LEG_kongzhizhuangliuliu[  2   ][  15  ] = 86  ;
  LEG_kongzhizhuangliuliu[  3   ][  0   ] = -92   ;
  LEG_kongzhizhuangliuliu[  3   ][  1   ] = -129  ;
  LEG_kongzhizhuangliuliu[  3   ][  2   ] = -165  ;
  LEG_kongzhizhuangliuliu[  3   ][  3   ] = -200  ;
  LEG_kongzhizhuangliuliu[  3   ][  4   ] = -200  ;
  LEG_kongzhizhuangliuliu[  3   ][  5   ] = -68   ;
  LEG_kongzhizhuangliuliu[  3   ][  6   ] = 68  ;
  LEG_kongzhizhuangliuliu[  3   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  3   ][  8   ] = 200   ;
  LEG_kongzhizhuangliuliu[  3   ][  9   ] = 165   ;
  LEG_kongzhizhuangliuliu[  3   ][  10  ] = 129   ;
  LEG_kongzhizhuangliuliu[  3   ][  11  ] = 92  ;
  LEG_kongzhizhuangliuliu[  3   ][  12  ] = 55  ;
  LEG_kongzhizhuangliuliu[  3   ][  13  ] = 19  ;
  LEG_kongzhizhuangliuliu[  3   ][  14  ] = -19   ;
  LEG_kongzhizhuangliuliu[  3   ][  15  ] = -55   ;
  LEG_kongzhizhuangliuliu[  4   ][  0   ] = 86  ;
  LEG_kongzhizhuangliuliu[  4   ][  1   ] = 92  ;
  LEG_kongzhizhuangliuliu[  4   ][  2   ] = 92  ;
  LEG_kongzhizhuangliuliu[  4   ][  3   ] = 86  ;
  LEG_kongzhizhuangliuliu[  4   ][  4   ] = 73  ;
  LEG_kongzhizhuangliuliu[  4   ][  5   ] = 55  ;
  LEG_kongzhizhuangliuliu[  4   ][  6   ] = 30  ;
  LEG_kongzhizhuangliuliu[  4   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  8   ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  9   ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  10  ] = 250   ;
  LEG_kongzhizhuangliuliu[  4   ][  11  ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  12  ] = 100   ;
  LEG_kongzhizhuangliuliu[  4   ][  13  ] = 30  ;
  LEG_kongzhizhuangliuliu[  4   ][  14  ] = 55  ;
  LEG_kongzhizhuangliuliu[  4   ][  15  ] = 73  ;
  LEG_kongzhizhuangliuliu[  5   ][  0   ] = 111   ;
  LEG_kongzhizhuangliuliu[  5   ][  1   ] = 37  ;
  LEG_kongzhizhuangliuliu[  5   ][  2   ] = -37   ;
  LEG_kongzhizhuangliuliu[  5   ][  3   ] = -111  ;
  LEG_kongzhizhuangliuliu[  5   ][  4   ] = -184  ;
  LEG_kongzhizhuangliuliu[  5   ][  5   ] = -257  ;
  LEG_kongzhizhuangliuliu[  5   ][  6   ] = -329  ;
  LEG_kongzhizhuangliuliu[  5   ][  7   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  8   ] = -400  ;
  LEG_kongzhizhuangliuliu[  5   ][  9   ] = -135  ;
  LEG_kongzhizhuangliuliu[  5   ][  10  ] = 135   ;
  LEG_kongzhizhuangliuliu[  5   ][  11  ] = 400   ;
  LEG_kongzhizhuangliuliu[  5   ][  12  ] = 400   ;
  LEG_kongzhizhuangliuliu[  5   ][  13  ] = 329   ;
  LEG_kongzhizhuangliuliu[  5   ][  14  ] = 257   ;
  LEG_kongzhizhuangliuliu[  5   ][  15  ] = 184   ;
  LEG_kongzhizhuangliuliu[  6   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  1   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  2   ] = 250   ;
  LEG_kongzhizhuangliuliu[  6   ][  3   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  4   ] = 100   ;
  LEG_kongzhizhuangliuliu[  6   ][  5   ] = 30  ;
  LEG_kongzhizhuangliuliu[  6   ][  6   ] = 55  ;
  LEG_kongzhizhuangliuliu[  6   ][  7   ] = 73  ;
  LEG_kongzhizhuangliuliu[  6   ][  8   ] = 86  ;
  LEG_kongzhizhuangliuliu[  6   ][  9   ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  10  ] = 92  ;
  LEG_kongzhizhuangliuliu[  6   ][  11  ] = 86  ;
  LEG_kongzhizhuangliuliu[  6   ][  12  ] = 73  ;
  LEG_kongzhizhuangliuliu[  6   ][  13  ] = 55  ;
  LEG_kongzhizhuangliuliu[  6   ][  14  ] = 30  ;
  LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  0   ] = -200  ;
  LEG_kongzhizhuangliuliu[  7   ][  1   ] = -68   ;
  LEG_kongzhizhuangliuliu[  7   ][  2   ] = 68  ;
  LEG_kongzhizhuangliuliu[  7   ][  3   ] = 200   ;
  LEG_kongzhizhuangliuliu[  7   ][  4   ] = 200   ;
  LEG_kongzhizhuangliuliu[  7   ][  5   ] = 165   ;
  LEG_kongzhizhuangliuliu[  7   ][  6   ] = 129   ;
  LEG_kongzhizhuangliuliu[  7   ][  7   ] = 92  ;
  LEG_kongzhizhuangliuliu[  7   ][  8   ] = 55  ;
  LEG_kongzhizhuangliuliu[  7   ][  9   ] = 19  ;
  LEG_kongzhizhuangliuliu[  7   ][  10  ] = -19   ;
  LEG_kongzhizhuangliuliu[  7   ][  11  ] = -55   ;
  LEG_kongzhizhuangliuliu[  7   ][  12  ] = -92   ;
  LEG_kongzhizhuangliuliu[  7   ][  13  ] = -129  ;
  LEG_kongzhizhuangliuliu[  7   ][  14  ] = -165  ;
  LEG_kongzhizhuangliuliu[  7   ][  15  ] = -200  ;

}
int  wodao( )
{
  LEG_kongzhizhuangliuliu[  0   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  0   ][  1   ] = 300   ;
  LEG_kongzhizhuangliuliu[  0   ][  2   ] = 400   ;
  LEG_kongzhizhuangliuliu[  0   ][  3   ] = 500   ;
  LEG_kongzhizhuangliuliu[  0   ][  4   ] = 500   ;
  LEG_kongzhizhuangliuliu[  0   ][  5   ] = 400   ;
  LEG_kongzhizhuangliuliu[  0   ][  6   ] = 300   ;
  LEG_kongzhizhuangliuliu[  0   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  0   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  0   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  1   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  1   ] = 300   ;
  LEG_kongzhizhuangliuliu[  2   ][  2   ] = 400   ;
  LEG_kongzhizhuangliuliu[  2   ][  3   ] = 500   ;
  LEG_kongzhizhuangliuliu[  2   ][  4   ] = 500   ;
  LEG_kongzhizhuangliuliu[  2   ][  5   ] = 400   ;
  LEG_kongzhizhuangliuliu[  2   ][  6   ] = 300   ;
  LEG_kongzhizhuangliuliu[  2   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  2   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  2   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  3   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  1   ] = 300   ;
  LEG_kongzhizhuangliuliu[  4   ][  2   ] = 400   ;
  LEG_kongzhizhuangliuliu[  4   ][  3   ] = 500   ;
  LEG_kongzhizhuangliuliu[  4   ][  4   ] = 500   ;
  LEG_kongzhizhuangliuliu[  4   ][  5   ] = 400   ;
  LEG_kongzhizhuangliuliu[  4   ][  6   ] = 300   ;
  LEG_kongzhizhuangliuliu[  4   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  4   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  4   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  5   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  0   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  1   ] = 300   ;
  LEG_kongzhizhuangliuliu[  6   ][  2   ] = 400   ;
  LEG_kongzhizhuangliuliu[  6   ][  3   ] = 500   ;
  LEG_kongzhizhuangliuliu[  6   ][  4   ] = 500   ;
  LEG_kongzhizhuangliuliu[  6   ][  5   ] = 400   ;
  LEG_kongzhizhuangliuliu[  6   ][  6   ] = 300   ;
  LEG_kongzhizhuangliuliu[  6   ][  7   ] = 200   ;
  LEG_kongzhizhuangliuliu[  6   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  0   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  1   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  2   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  3   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  4   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  5   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  6   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  7   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  8   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  9   ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  10  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  11  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  12  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  13  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  14  ] = 0   ;
  LEG_kongzhizhuangliuliu[  7   ][  15  ] = 0   ;



}
int  woshou( )
{
LEG_kongzhizhuangliuliu[  0   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  0   ][  8   ] = 300   ;
LEG_kongzhizhuangliuliu[  0   ][  9   ] = 400   ;
LEG_kongzhizhuangliuliu[  0   ][  10  ] = 500   ;
LEG_kongzhizhuangliuliu[  0   ][  11  ] = 500   ;
LEG_kongzhizhuangliuliu[  0   ][  12  ] = 500   ;
LEG_kongzhizhuangliuliu[  0   ][  13  ] = 500   ;
LEG_kongzhizhuangliuliu[  0   ][  14  ] = 400   ;
LEG_kongzhizhuangliuliu[  0   ][  15  ] = 300   ;
LEG_kongzhizhuangliuliu[  1   ][  0   ] = 50  ;
LEG_kongzhizhuangliuliu[  1   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  1   ][  3   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  4   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  7   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  8   ] = 200   ;
LEG_kongzhizhuangliuliu[  1   ][  9   ] = 400   ;
LEG_kongzhizhuangliuliu[  1   ][  10  ] = 500   ;
LEG_kongzhizhuangliuliu[  1   ][  11  ] = 800   ;
LEG_kongzhizhuangliuliu[  1   ][  12  ] = 800   ;
LEG_kongzhizhuangliuliu[  1   ][  13  ] = 500   ;
LEG_kongzhizhuangliuliu[  1   ][  14  ] = 400   ;
LEG_kongzhizhuangliuliu[  1   ][  15  ] = 200   ;
LEG_kongzhizhuangliuliu[  2   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  8   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  9   ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  10  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  11  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  12  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  13  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  14  ] = 0   ;
LEG_kongzhizhuangliuliu[  2   ][  15  ] = 0   ;
LEG_kongzhizhuangliuliu[  3   ][  0   ] = 50  ;
LEG_kongzhizhuangliuliu[  3   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  3   ][  3   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  4   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  7   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  8   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  9   ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  10  ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  11  ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  12  ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  13  ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  14  ] = 200   ;
LEG_kongzhizhuangliuliu[  3   ][  15  ] = 200   ;
LEG_kongzhizhuangliuliu[  4   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  8   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  9   ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  10  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  11  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  12  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  13  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  14  ] = 0   ;
LEG_kongzhizhuangliuliu[  4   ][  15  ] = 0   ;
LEG_kongzhizhuangliuliu[  5   ][  0   ] = 50  ;
LEG_kongzhizhuangliuliu[  5   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  5   ][  3   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  4   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  7   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  8   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  9   ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  10  ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  11  ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  12  ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  13  ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  14  ] = 200   ;
LEG_kongzhizhuangliuliu[  5   ][  15  ] = 200   ;
LEG_kongzhizhuangliuliu[  6   ][  0   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  1   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  2   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  3   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  4   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  5   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  6   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  7   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  8   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  9   ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  10  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  11  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  12  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  13  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  14  ] = 0   ;
LEG_kongzhizhuangliuliu[  6   ][  15  ] = 0   ;
LEG_kongzhizhuangliuliu[  7   ][  0   ] = 50  ;
LEG_kongzhizhuangliuliu[  7   ][  1   ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  2   ] = 100   ;
LEG_kongzhizhuangliuliu[  7   ][  3   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  4   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  5   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  6   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  7   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  8   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  9   ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  10  ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  11  ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  12  ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  13  ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  14  ] = 200   ;
LEG_kongzhizhuangliuliu[  7   ][  15  ] = 200   ;

}








